{% extends "base.html" %}
{% block content_title %}{% endblock %}

{% block content %}

{% if not PELICAN_SOBER_HOME_LISTS_ARTICLES %}

  {% for article in articles %}

      {% if loop.index == 1 %}

        <article>
          <h1><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></h1>
          {{ article.content }}
        </article>

        <hr />

        {% if loop.length  > 1 %}
          <div>
            <h3>Last posts</h3>
            <ol class="archive">
        {% endif %}

      {% elif loop.index < 7 %}
        <li>
          {% include 'article_link.inc.html' %}
        </li>
      {% endif %}

  {% endfor %}

  {% if articles|length > 1 %}
            </ol>
          </div>
  {% endif %}

{% else %}

  {% for article in articles_page.object_list %}
    {% include 'article_summary.inc.html' %}
  {% endfor %}

  {% include 'pagination.inc.html' %}

{% endif %}

{% endblock content %}
